xinetd:
  pkg.installed:
    - pkgs:
      - xinetd
      - tftp-server
      - syslinux-tftpboot
  file.managed:
    - name: /etc/xinetd.d/tftp
    - source: salt://tftp/files/etc/xinetd.d/tftp
    - template: jinja
    - require: 
      - pkg: xinetd
  service.running:
    - name: xinetd
    - enable: True
    - watch:
      - pkg: xinetd
      - file: /etc/xinetd.d/tftp
    - require: 
      - file: /var/lib/tftpboot/pxelinux.cfg

pxe_default:
  file.managed:
    - name: /var/lib/tftpboot/pxelinux.cfg/default
    - source: salt://tftp/files/var/lib/tftpboot/pxelinux.cfg/default
    - makedirs: True
    - template: jinja
    - require: 
      - pkg: xinetd
